package com.jian.springbootdemosdk;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties("japi.client")
@ComponentScan
public class JApiClientConfig {
    private String accessKey;
    private String securityKey;

    public String getAccessKey() {
        return accessKey;
    }

    public String getSecurityKey() {
        return securityKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public void setSecurityKey(String securityKey) {
        this.securityKey = securityKey;
    }

    @Bean
    public JApiClient jApiClient() {
        return new JApiClient(accessKey, securityKey);
    }
}
